-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
pr05 Typescript Migration #13: Migrate the User Model (& API Key schema) #3672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pr05 Typescript Migration #13: Migrate the User Model (& API Key schema) #3672
Conversation
lastLoginTimestamp: { type: Date } | ||
}, | ||
{ timestamps: true, usePushEach: true } | ||
{ timestamps: true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need usePushEach anymore? is it set to that by default? just wanted to make sure it didn't slip through the cracks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this! It was used for older mongo versions, and is no longer needed past v5, so i think we might be good here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi guys sorry for the delayed response! Yess once I migrated this file to ts, usePushEach
was highlighting in red as it was deprecated for the current version of mongo, so I think we're meant to delete it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging this in!
Migration of the user model to ts
Changes:
inferSchemaType
and other infers but this was honestly really hard to debug and it was easier to explicity define what we expect from the types and feed it to the mongoose scheme definition, and attach the extra Document methodsI have verified that this pull request:
npm run lint
)npm run test
)develop
branch.Fixes #123